package com.group6.converter;

import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.view.Menu;
import android.view.View;
import android.widget.Button;

public class Converter extends Activity {

        @Override
        protected void onCreate(Bundle savedInstanceState) {
                super.onCreate(savedInstanceState);
                setContentView(R.layout.activity_converter);
                
                Button button = (Button) findViewById(R.id.Button03);
                button.setOnClickListener(new View.OnClickListener() {
                    public void onClick(View v) {
                        decimal(v);
                    }
                });
                
                Button button1 = (Button) findViewById(R.id.Button02);
                button1.setOnClickListener(new View.OnClickListener() {
                    public void onClick(View v) {
                        binary(v);
                    }
                });
                
                Button button2 = (Button) findViewById(R.id.Button01);
                button2.setOnClickListener(new View.OnClickListener() {
                    public void onClick(View v) {
                        octal(v);
                    }
                });
                
                Button button3 = (Button) findViewById(R.id.button1);
                button3.setOnClickListener(new View.OnClickListener() {
                    public void onClick(View v) {
                        hexadecimal(v);
                    }
                });
                
                Button button4 = (Button) findViewById(R.id.Button04);
                button4.setOnClickListener(new View.OnClickListener() {
                    public void onClick(View v) {
                        BinMDAS(v);
                    }
                });
                
                Button button5 = (Button) findViewById(R.id.Button05);
                button5.setOnClickListener(new View.OnClickListener() {
                    public void onClick(View v) {
                        DecMDAS(v);
                    }
                });
                
                Button button6 = (Button) findViewById(R.id.Button06);
                button6.setOnClickListener(new View.OnClickListener() {
                    public void onClick(View v) {
                        OctMDAS(v);
                    }
                });
                
                Button button7 = (Button) findViewById(R.id.Button07);
                button7.setOnClickListener(new View.OnClickListener() {
                    public void onClick(View v) {
                        HexMDAS(v);
                    }
                });
        }
              
        public void decimal(View view) {
            Intent i = new Intent(Converter.this, Decimal.class);
            startActivity(i);
            //finish();
    }
        public void binary(View view) {
            Intent i = new Intent(Converter.this, Binary.class);
            startActivity(i);
            //finish();
    }
        public void octal(View view) {
            Intent i = new Intent(Converter.this, Octal.class);
            startActivity(i);
            //finish();
    }
        public void hexadecimal(View view) {
            Intent i = new Intent(Converter.this, Hexadecimal.class);
            startActivity(i);
            //finish();
    }
        public void BinMDAS(View view) {
            Intent i = new Intent(Converter.this, BinMDAS.class);
            startActivity(i);
            //finish();
    }
        public void DecMDAS(View view) {
            Intent i = new Intent(Converter.this, DecMDAS.class);
            startActivity(i);
            //finish();
    }
        public void OctMDAS(View view) {
            Intent i = new Intent(Converter.this, OctalMDAS.class);
            startActivity(i);
            //finish();
    }
        public void HexMDAS(View view) {
            Intent i = new Intent(Converter.this, HexadecimalMDAS.class);
            startActivity(i);
            //finish();
    }
}
